package com.lza.phone.mapper;

import com.lza.phone.entity.SocSort;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 李钊澳
 * @since 2021-09-13
 */
public interface SocSortMapper extends BaseMapper<SocSort> {
    @Select("select sort.socCompany,count(*) as count  from soc s INNER JOIN\n" +
            "\tsocSort sort ON\n" +
            "\ts.socSortId=sort.id\n" +
            "\tGROUP BY sort.socCompany")
    List<SocSort> countCpuCompany();//统计各公司处理器数量

}
